package org.jeecg.modules.columnTopic.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.jeecg.modules.columnTopic.entity.ColumnTopicPublish;
import org.jeecg.modules.columnmanager.vo.ColumnManagerVO;

import java.util.List;

/**
 * @Description: 栏目订阅
 * @Author: jeecg-boot
 * @Date:   2020-12-05
 * @Version: V1.0
 */
public interface ColumnTopicPublishMapper extends BaseMapper<ColumnTopicPublish> {

    /**
     * TODO: 根据名称获取id
     *
     *
     * @author ZhangHaoyu
     * @param columnName
     * @return java.lang.String
     */
    @Select("select id from sys_dict_item where dict_id = '1332568071710691330' and item_text = #{columnName}")
    String getColumnIdByName(@Param("columnName") String columnName);

    /**
     * TODO: 根据用户openId获取他订阅的栏目的信息
     *
     *
     * @author ZhangHaoyu
     * @param openId 用户openId
     * @return org.jeecg.modules.columnmanager.vo.ColumnManagerVO
     */
    List<ColumnManagerVO> getColumnInfoByOpenId(@Param("openId") String openId);
}
